<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="dao.CommDAO"%>
<%@page import="util.Info"%>
<%@page import="util.PageManager"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0028)http://csir461.com/index.jsp -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>机票预订网站</TITLE>
<LINK rel=stylesheet type=text/css href="npticketsys_files/css.css">


<STYLE type=text/css>
.STYLE1 {
	COLOR: #d77745
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.6001.19222">
</HEAD>
<BODY>


	<LINK rel=stylesheet type=text/css href="npticketsys_files/css.css">
	<STYLE type=text/css>
BODY {
	MARGIN: 0px
}

BODY {
	FONT-FAMILY: 宋体
}

TD {
	FONT-FAMILY: 宋体
}

TH {
	FONT-FAMILY: 宋体
}
</STYLE>



	<TABLE class=bk border=0 cellSpacing=0 cellPadding=0 width=950
		align=center>
		<TBODY>
			<TR>
				<TD vAlign=top>

					<LINK rel=stylesheet type=text/css href="npticketsys_files/css.css">



					<jsp:include page="top.jsp"></jsp:include> <%
                  CommDAO dao = new CommDAO();
                  HashMap map = new HashMap();
                  String hxlx = request.getParameter("hxlx");
                  if("1".equals(hxlx)){
                	  hxlx="国内航班";
                  }else{
                	  hxlx="国际航班";
                  }
                  String fxhx = request.getParameter("fxhx")==null?"":request.getParameter("fxhx");  
				String company = request.getParameter("company")==null?"":request.getParameter("company"); 
				if(request.getParameter("f")!=null)
				hxlx = Info.getUTFStr(hxlx);
				
				String stime = request.getParameter("stime")==null?"":request.getParameter("stime"); 
				String etime = request.getParameter("etime")==null?"":request.getParameter("etime"); 
				String sql = "select * from hangban where hxlx='"+hxlx+"'  ";
				String url = "wzgg.jsp?1=1";
				if(!company.equals(""))
				{
				map.put("company",company);
				url+="&company="+company;
				sql+=" and company='"+company+"' ";
				}
				if(!fxhx.equals(""))
				{
				map.put("fxhx",fxhx);
				url+="&fxhx="+fxhx;
				sql+=" and fxhx like'%"+fxhx+"%' ";
				}
				if(!etime.equals(""))
				{
				map.put("etime",etime);
				url+="&etime="+etime;
				sql+=" and etime<'"+Info.getDay(etime,1)+"' ";
				}
				if(!stime.equals(""))
				{
				map.put("stime",stime);
				url+="&stime="+stime;
				sql+=" and stime>'"+stime+"' ";
				}
				PageManager pageManager = PageManager.getPage(url,16, request);
				pageManager.doList(sql);
                   %>



					<form name=f1 action="wzgg.jsp?f=f&hxlx=<%=hxlx %>" method="post">

						<TABLE border=0 cellSpacing=0 cellPadding=0 width=100 align=center>
							<TBODY>
								<TR>
									<TD vAlign=top>
										<TABLE class=mt border=0 cellSpacing=0 cellPadding=0 width=925>
											<TBODY>
												<TR>
													<TD vAlign=top width=693>
														<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%"
															align=left>
															<TBODY>
																<TR>
																	<TD vAlign=top align=middle>


																		<TABLE border=0 cellSpacing=0 cellPadding=0
																			width="100%">
																			<TBODY>
																				<TR>
																					<TD>
																						<TABLE border=0 cellSpacing=0 cellPadding=0
																							width="100%" align=left>
																							<TBODY>
																								<TR>
																									<TD height=24
																										background=npticketsys_files/112bg.gif
																										width=320 align=left>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width=200 align=left>
																											<TBODY>
																												<TR>
																													<TD width=8 align=left>&nbsp;</TD>
																													<TD class=ls height=24 vAlign=bottom
																														width=174 align=left><STRONG>国内航班</STRONG></TD>
																												</TR>
																											</TBODY>
																										</TABLE>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																				<TR>
																					<TD>
																						<TABLE class=mt border=0 cellSpacing=0
																							cellPadding=0 width="100%">
																							<TBODY>
																								<TR>
																									<TD align=left vAlign=top>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width="100%">
																											<TBODY>


																												<TR>
																													<TD height=34 colspan="11" align=left
																														vAlign=center class=xh>&nbsp;&nbsp;&nbsp;&nbsp;

																														飞行航线 &nbsp;:&nbsp; <input type=text
																														class='textBox' size=20 name='fxhx' />&nbsp;&nbsp;&nbsp;
																														航空公司 &nbsp;:&nbsp; <%=Info.getselect("company","company","cname"," 1=1 ")%>&nbsp;&nbsp;&nbsp;
																														航班时间 &nbsp;:&nbsp; <input type=text
																														size='8' class='textBox' name='stime'
																														onClick="WdatePicker();" /> 至 <input
																														type=text size='8' class='textBox'
																														name='stime' onClick="WdatePicker();" />
																														&nbsp;<input type=submit class=''
																														value='查询信息' /> <script
																															language=javascript
																															src='/npticketsys/js/My97DatePicker/WdatePicker.js'></script>
																													</TD>
																												</TR>



																												<TR>
																													<TD class=xh height=24 vAlign=center
																														align=center>航班号</TD>
																													<TD class=xh height=24 vAlign=center
																														align=center>航线类型</TD>
																													<TD class=xh vAlign=center align=center>飞行航线</TD>
																													<TD class=xh vAlign=center align=center>起飞时间</TD>
																													<TD class=xh vAlign=center align=center>到达时间</TD>
																													<TD class=xh vAlign=center align=center>航空公司</TD>
																													<TD class=xh vAlign=center align=center>头等舱票价</TD>
																													<TD class=xh vAlign=center align=center>普通舱票价</TD>
																													<TD class=xh vAlign=center align=center>折扣</TD>
																													<TD class=xh vAlign=center align=center>剩票数量</TD>
																													<TD class=xh vAlign=center align=center>预订</TD>
																												</TR>

																												<%
                                
							    
							    PageManager bean= (PageManager)request.getAttribute("page");
							    ArrayList<HashMap> nlist=(ArrayList)bean.getCollection();
							    for( HashMap m :nlist)
							    {
                                 %>
																												<TR>


																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("hbno") %></TD>

																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("hxlx") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("fxhx") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("stime") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("etime") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("company") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("crprice") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("etprice") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("discount") %></TD>
																													<TD height=24 align=center vAlign=center
																														class=xh><%=m.get("nums") %></TD>



																													<TD height=24 align=center vAlign=center
																														class=xh>
																														<%
                                if(Info.getUser(request)!=null){
                                 %> <a
																														href="javascript:add(<%=m.get("id") %>)">预订</a>
																														<%}else{ %> 请先登录 <%} %>
																													</TD>
																												</TR>
																												<%} %>

																												<TR>
																													<TD height=40 colspan="11" align=center
																														vAlign=center class=xh>${page.info }
																													</TD>
																												</TR>
																											</TBODY>
																										</TABLE>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																			</TBODY>
																		</TABLE>



																	</TD>
																</TR>
															</TBODY>
														</TABLE>
													</TD>








												</TR>
											</TBODY>
										</TABLE>
									</TD>
								</TR>
							</TBODY>
						</TABLE>


					</form> <%=Info.tform(map) %>






					<TABLE border=0 cellSpacing=0 cellPadding=0 width=950>
						<TBODY>
							<TR>
								<TD>&nbsp;</TD>
							</TR>
						</TBODY>
					</TABLE>
				</TD>
			</TR>
		</TBODY>
	</TABLE>


	<script language=javascript> 
function add(no){ 
popheight = 80;
pop('yd.jsp?id='+no,'预订',550,430) 
}
</script>

	<jsp:include page="foot.jsp"></jsp:include>



</BODY>
</HTML>
